package com.xiaoshuidi.cloud.module.system.api.auth;

import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.system.api.auth.dto.UserIdAuthRespDTO;
import com.xiaoshuidi.cloud.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 用户实名认证")
public interface UserIdAuthenticationApi {

    String PREFIX = ApiConstants.PREFIX + "/userIdAuth";

    @GetMapping(PREFIX + "/getByPhone")
    @Operation(summary = "获得个人用户实名信息")
    @Parameter(name = "phone", description = "手机号", example = "1024", required = true)
    CommonResult<UserIdAuthRespDTO> getUserIDAuthByPhone(@RequestParam("phone") String phone);


    @GetMapping(PREFIX + "/getCompanyAuthList")
    @Operation(summary = "获得签约主体列表")
    CommonResult<List<UserIdAuthRespDTO>> getCompanyAuthList();

    @GetMapping(PREFIX + "/getById")
    @Operation(summary = "获得个人用户实名信息")
    @Parameter(name = "id", description = "id", example = "1024", required = true)
    CommonResult<UserIdAuthRespDTO> getUserIDAuthById(@RequestParam("id") Integer id);
}
